home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / application / DragSource.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  1.1 KB  |  32 lines  |  [TEXT/CWIE]

  1. // DragSource.java
  2. // By Ned Etcode
  3. // Copyright 1996, 1997 Netscape Communications Corp.  All rights reserved.
  4.  
  5. package netscape.application;
  6.  
  7. /** Interface implemented by objects interested in initiating drag sessions.
  8.   * These methods provide context for the DragSession managing the drag
  9.   * session, and notification of a drag session's results.
  10.   * @see DragSession
  11.   */
  12. public interface DragSource {
  13.     /** Returns the View from which the drag session originated. This View
  14.       * determines the context for the coordinates supplied to the
  15.       * DragSession.
  16.       * @see DragSession
  17.       */
  18.     public View sourceView(DragSession session);
  19.  
  20.     /** Called when the user releases a DragSession and the receiving
  21.       * DragDestination accepts the dragged item.
  22.       */
  23.     public void dragWasAccepted(DragSession session);
  24.  
  25.     /** Called when the user releases a DragSession without it being accepted
  26.       * by a DragDestination.  This method should return <b>true</b> if the
  27.       * DragSession's image should animate back to the drag session's origin.
  28.       */
  29.     public boolean dragWasRejected(DragSession session);
  30. }
  31.  
  32.